🌐 [translation-sync] FIX: seven source-side defects in python_by_example, functions, numpy and pandas - #149
🌐 [translation-sync] FIX: seven source-side defects in python_by_example, functions, numpy and pandas#149mmcky wants to merge 8 commits into
Conversation
✅ Deploy Preview for majestic-griffin-10b166 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Translation Quality ReviewVerdict: PASS | Model: claude-sonnet-5 | Date: 2026-08-05 📝 Translation Quality
Summary: The translation of the modified sections (Overview, Random Draws, Recursive Function Calls, Exercises, Creating Arrays, Make Changes in DataFrames, Accessing Data with requests, While Loops) is accurate, fluent, and technically sound. Minor issues are limited to small spacing/typo slips and slightly literal phrasing in a few spots, none of which affect comprehension or build integrity. No syntax errors were found in code blocks, math, or MyST directives within the changed sections. Technical terminology (NumPy, broadcasting, DataFrame, Series, callable, etc.) is consistently kept in English/Latin script alongside accurate Persian explanations, matching the language policy. Code blocks, LaTeX math, and MyST directives (exercise-start/solution-start, code-cell, etc.) are fully preserved without structural corruption across all four changed files. The translation of nuanced concepts like keyword arguments, recursion, and broadcasting rules is accurate and mirrors the logical structure of the English source closely. Persian punctuation and formal academic register are used appropriately throughout the modified sections. Suggestions:
🔍 Diff Quality
Summary: All four target files were correctly updated in the same locations as the English source, with translated text and code both properly synced and no unrelated changes. This review was generated automatically by action-translation review mode. |
There was a problem hiding this comment.
Pull request overview
Syncs the Persian (fa) lecture translations with upstream source fixes from QuantEcon/lecture-python-programming#604, correcting several source-side defects and improving consistency in narrative and code examples across multiple chapters.
Changes:
- Updated translated explanatory text and inline-code formatting for clarity/consistency (e.g.,
python_by_example,numpy,functions). - Adjusted pandas code examples to use more robust type / missing-value checks (
isinstance,pd.isna). - Refreshed translation sync state metadata to the new upstream source SHA, sync date, model, and tool version.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lectures/functions.md | Minor content/wording cleanup (stack LIFO description; spacing). |
| .translate/state/functions.md.yml | Sync metadata updated (source SHA/date/model/tool version). |
| lectures/numpy.md | Corrected class naming reference and standardized “NumPy” spelling in narrative. |
| .translate/state/numpy.md.yml | Sync metadata updated (source SHA/date/model/tool version). |
| lectures/pandas.md | Improved robustness of example code (isinstance, pd.isna) and adjusted narrative around requests usage. |
| .translate/state/pandas.md.yml | Sync metadata updated (source SHA/date/model/tool version). |
| lectures/python_by_example.md | Improved Persian explanation wording and standardized inline-code formatting. |
| .translate/state/python_by_example.md.yml | Sync metadata updated (source SHA/date/model/tool version). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * مشکل پروکسی خود را با خواندن [مستندات](https://requests.readthedocs.io/en/latest/) حل کنید | ||
|
|
||
| با فرض اینکه همه چیز کار میکند، اکنون میتوانید از شیء `source` برگردانده شده توسط فراخوانی `requests.get('https://research.stlouisfed.org/fred2/series/UNRATE/downloaddata/UNRATE.csv')` استفاده کنید | ||
| با فرض اینکه همه چیز کار میکند، اکنون میتوانید شیء `source` را از دادههای برگردانده شده توسط فراخوانی `requests.get(url)` بسازید |
|
Notes from reviewing the zh-cn counterpart of this same sync round (.zh-cn#86, now merged). Two things, one pre-emptive and one that wants a native-speaker eye.
|
| Upstream item | Persian status |
|---|---|
space after --- at the np.loadtxt line |
already --- with spaces both sides at numpy.md:239 ✅ |
**Part1** → **Part 1** |
already **قسمت 1** / **قسمت 2** with digit and space ✅ |
Numpy → NumPy |
carried in this PR ✅ |
prose discreteRV → DiscreteRV |
carried in this PR ✅ |
Worth recording because zh-cn needed a fix-up here and this edition does not: upstream's change was to add a space after its ---, and the zh-cn sync mirrored that as a space before the full-width ——, which Chinese does not take. Persian was already spaced on both sides, so the same mirroring had nothing to do.
Does the while restructure carry the semantic fix?
This is the one item I could not settle. Upstream's python_by_example.md change was specifically semantic, not stylistic — "keep executing until the condition is satisfied" was backwards and contradicted the sentence immediately after it, so it became "as long as the condition is satisfied".
In this PR the Persian sentence is reordered but both the before and after use تا زمانی که, and the following sentence also uses تا زمانی که, there carrying the "until" sense (تا زمانی که i برابر با ts_length شود). So the two adjacent sentences appear to use the same connective for the two opposite meanings that upstream deliberately separated.
I do not read Persian well enough to judge whether the reordering resolves that in context. If it does not, the fix has landed structurally without landing semantically, which is the thing #604 was actually trying to correct.
Minor
The FILO → LIFO line also quietly corrects می کند → میکند (ZWNJ). That is an improvement rather than scope drift, just flagging it so it is not read as an unrelated edit.
Automated Translation Sync
This PR contains automated translations from QuantEcon/lecture-python-programming.
Source PR
#604 - FIX: seven source-side defects in python_by_example, functions, numpy and pandas
Files Updated
lectures/functions.md.translate/state/functions.md.ymllectures/numpy.md.translate/state/numpy.md.ymllectures/pandas.md.translate/state/pandas.md.ymllectures/python_by_example.md.translate/state/python_by_example.md.ymlDetails
This PR was created automatically by the translation action.